package com.ext.aic.apis.user;

import android.content.Context;

import androidx.lifecycle.LifecycleOwner;

import com.ext.aic.apis.ApiDefine;
import com.ext.aic.apis.ApiPaths;
import com.ext.aic.apis.RequestResponse;
import com.ext.aic.beans.params.LogoutParams;
import com.eyinfo.android_pure_utils.utils.JsonUtils;
import com.hjq.http.EasyHttp;
import com.hjq.http.body.JsonRequestBody;

public class LogoutRequest {
    public void request(Context context, LifecycleOwner lifecycleOwner, LogoutParams params) {
        EasyHttp.post(lifecycleOwner)
                .api(new ApiDefine(ApiPaths.logout))
                .body(new JsonRequestBody(JsonUtils.toJson(params)))
                .request(new RequestResponse<Object>(context, true) {
                    @Override
                    protected void onSuccess(Object response) {

                    }
                });

    }
}
